package ua.maxicash.service;

import ua.maxicash.vo.Message;

import java.util.List;
import java.util.Set;

public interface MessageService {
	
	public void sendMessage(String sender, String receiver, String subject, String text);

	public List<Message> getAllMessages();
	
	public List<Message> getAllReceivedMessages(String receiversEmail);
	
	public List<Message> getAllSentMessages(String sendersEmail);

    public long getCountOfUnreadMessages(String userEmail);

    public void markMessageAsRead(Long idMessage);

	public Message getMessageById(Long idMessage, boolean markAsRead);

    public Set<Message> getReceivedMessages(String receiversEmail, Long offset, Long amount);

	public Set<Message> getSentMessages(String sendersEmail, Long offset, Long amount);

    public long getCountOfReceivedMessages(String receiversEmail);

    public long getCountOfSentMessages(String sendersEmail);

    public void saveMessage(Message message);
}
